home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / developm / source / drgnsmth.cpt / Dragonsmith 1.1 / Base files / Utilities / GestaltUtils.h < prev    next >
Encoding:
Text File  |  1992-10-11  |  970 b   |  29 lines

  1. /*
  2.     GestaltUtils.h
  3. */
  4.  
  5. enum {
  6.     opBitAnd,            // 0    All bits set in the compValue must be set in the Gestalt result
  7.     opEqual,                // 1    Gestalt result must equal the compValue
  8.     opNotEqual,            // 2    Ditto, not equal
  9.     opGreater,            // 3    Gestalt result must be greater than the compValue
  10.     opGreaterOrEqual,        // 4    Ditto, greater than or equal to
  11.     opLess,                // 5    Ditto, less than
  12.     opLessOrEqual,        // 6    Ditto, less than or equal
  13.     opNoErrIsOK            // 7    All is OK as long as noErr was returned ╤ compValue is ignored
  14. };
  15.  
  16. typedef struct {
  17.     OSType    selector;        // Gestalt selector
  18.     short    compOp;        // How should the compValue and Gestalt result be compared?
  19.     short    failureError;    // Error code if comparison fails
  20.     long        compValue;    // Value to check the Gestalt result against
  21. } GstCheckRec;
  22.  
  23. typedef struct {
  24.     short            numChecks;
  25.     GstCheckRec        check[1];
  26. } GstCheckList;
  27.  
  28. OSErr GestaltBatchCheck (GstCheckList **checkList);
  29. Boolean GestaltResultOK (OSType selector, short compOp, long compValue);